#ifndef __IIC_H__
#define __IIC_H__

#include "esp_system.h"
#include "driver/i2c_master.h"

typedef uint8_t     u8;
typedef uint16_t    u16; 
typedef int8_t      s8; 
typedef int16_t     s16;     
typedef uint32_t    u32; 
typedef int32_t     s32;   


esp_err_t iic_init(void);
i2c_master_dev_handle_t register_iic_device(uint8_t addr,uint32_t speed);
esp_err_t iic_write(i2c_master_dev_handle_t dev, uint8_t *data, size_t len);
esp_err_t iic_read(i2c_master_dev_handle_t dev, uint8_t *data, size_t len);
#endif //
